Railway oriented programming